package com.kitbox.hl.meshow.framenwork.listener.entity;

import org.camunda.bpm.engine.delegate.BaseDelegateExecution;
import org.camunda.bpm.engine.delegate.DelegateListener;
import org.camunda.bpm.engine.delegate.VariableListener;
import org.camunda.bpm.engine.impl.core.model.Properties;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Auther: honglei
 * @Date: 2019/8/20 10:11
 * @Description:
 */
public class MyCoreModelElement {
    protected String id;
    protected String name;
    protected Properties properties = new Properties();

    /** contains built-in listeners */
    protected Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> builtInListeners = new HashMap<String, List<DelegateListener<? extends BaseDelegateExecution>>>();

    /** contains all listeners (built-in + user-provided) */
    protected Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> listeners = new HashMap<String, List<DelegateListener<? extends BaseDelegateExecution>>>();

    protected Map<String, List<VariableListener<?>>> builtInVariableListeners =
            new HashMap<String, List<VariableListener<?>>>();

    protected Map<String, List<VariableListener<?>>> variableListeners =
            new HashMap<String, List<VariableListener<?>>>();


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> getBuiltInListeners() {
        return builtInListeners;
    }

    public void setBuiltInListeners(Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> builtInListeners) {
        this.builtInListeners = builtInListeners;
    }

    public Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> getListeners() {
        return listeners;
    }

    public void setListeners(Map<String, List<DelegateListener<? extends BaseDelegateExecution>>> listeners) {
        this.listeners = listeners;
    }

    public Map<String, List<VariableListener<?>>> getBuiltInVariableListeners() {
        return builtInVariableListeners;
    }

    public void setBuiltInVariableListeners(Map<String, List<VariableListener<?>>> builtInVariableListeners) {
        this.builtInVariableListeners = builtInVariableListeners;
    }

    public Map<String, List<VariableListener<?>>> getVariableListeners() {
        return variableListeners;
    }

    public void setVariableListeners(Map<String, List<VariableListener<?>>> variableListeners) {
        this.variableListeners = variableListeners;
    }
}
